A k-nearest neighbor model is a form of classifier which is commonly implemented on a computer for machine learning and machine pattern recognition tasks. It is often desirable to implement a classifier on a computer in a way that allows other computers to submit input data to be applied to the classifier and to receive results from the classifier. However, in some situations, an entity providing input data does not want other entities to access that input data. Similarly, an entity providing the classifier does not want another entity to learn any information about the classifier, other than the result corresponding to the input data provided by that entity.